//
//  Timer.swift
//  WebSocketDemo
//
//  Created by 姬向阳 on 2020/5/13.
//  Copyright © 2020 SUNNYJ. All rights reserved.
//

import SwiftUI

class Dater {
    static func messageTime(_ timeInterval: Int) -> String {
        let time = Date(timeIntervalSince1970: TimeInterval(timeInterval))
        return time.description(with: .autoupdatingCurrent)
    }
    
    static func historyTime(_ timeInterval: Int) -> String {
        let time = Date(timeIntervalSinceNow: TimeInterval(timeInterval))
        return time.description(with: .autoupdatingCurrent)
    }
}
